/**
 * 
 */
package com.oscarmovie.dao;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.oscarmovie.model.Statistics;

/**
 * @author zhengda
 *
 */
public class StatisticsDaoImpl extends HibernateDaoSupport implements StatisticsDao {

	/* (non-Javadoc)
	 * @see com.oscarmovie.dao.StatisticsDao#save(com.oscarmovie.model.MovieStatistics)
	 */
	
	public void save(Statistics statistics) {
		getSession().saveOrUpdate(statistics);
	}

	/* (non-Javadoc)
	 * @see com.oscarmovie.dao.StatisticsDao#loadStatisticsByMovieId(int)
	 */
	
	public Statistics load(int id) {
		//TODO:
		Statistics s = (Statistics)getSession().load(Statistics.class, id);
		
		return s;
	}

}
